package com.liesheng.haylou.ui.main.equipment;

import androidx.databinding.ObservableArrayList;
import androidx.databinding.ObservableBoolean;
import androidx.databinding.ObservableInt;

/**
 * Date:2019/12/10
 * <p>
 * Author:wuzhiguang
 * <p>
 * Description:
 */
public class EquipmentItemVm {

    public EquipmentItemVm() {
        setBatteries(0,0,0);
        setCharging(0,0,0);
    }


    //所有的数组都是按照 盒子-左耳机-右耳机 的顺序来赋值的

    public ObservableArrayList<Integer>  batteries = new ObservableArrayList(); // 电量

    public ObservableArrayList<Integer>  charging = new ObservableArrayList();  // 是否在充电,1为充电

    public ObservableBoolean isConn = new ObservableBoolean(); //是否连接
    public ObservableBoolean hasScaned = new ObservableBoolean(); //是否被扫描到了


    public void setBatteries(int box,int left,int right){
        batteries.clear();
        batteries.add(0,box);
        batteries.add(1,left);
        batteries.add(2,right);
    }
    public void setCharging(int box,int left,int right){
        charging.clear();
        charging.add(0,box);
        charging.add(1,left);
        charging.add(2,right);
    }
}
